From: Etienne Champetier Date: Fri, 10 Oct 2025 22:26:53 +0000 (-0400) Subject: ci,Justfile: fix building with the right stream X-Git-Tag: archive/raspbian/2025.7-2+rpi1^2^2~6^2^2~7^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/%22stanciumarius94%40gmail.com//%22mailto:i18n-csb%40linuxcsb.org/%22/%22http:/www.example.com/%22stanciumarius94%40gmail.com/%22mailto:i18n-csb%40linuxcsb.org/%22?a=commitdiff_plain;h=7309d42b333d0c6ec02baa364a02055b766eb877;p=ostree.git ci,Justfile: fix building with the right stream Part of the `e2e (stream10)` was running stream9. As `just` doesn't support named parameters yet, use `STREAM` env var to select between stream9 and stream10 --- diff --git a/.github/workflows/bootc.yaml b/.github/workflows/bootc.yaml index 6104d803..914780de 100644 --- a/.github/workflows/bootc.yaml +++ b/.github/workflows/bootc.yaml @@ -32,11 +32,11 @@ jobs: sudo apt update sudo apt install -y crun/testing podman/testing skopeo/testing - name: build - run: sudo just build --build-arg=base=quay.io/centos-bootc/centos-bootc:${{ matrix.stream }} + run: sudo STREAM=${{ matrix.stream }} just build - name: unitcontainer - run: sudo just unitcontainer + run: sudo STREAM=${{ matrix.stream }} just unitcontainer - name: unittest - run: sudo just unittest + run: sudo STREAM=${{ matrix.stream }} just unittest - name: bootc install run: | set -xeuo pipefail diff --git a/Justfile b/Justfile index d46f6c0f..c1316990 100644 --- a/Justfile +++ b/Justfile @@ -1,16 +1,22 @@ # Detect the os for a workaround below osid := `. /usr/lib/os-release && echo $ID` +stream := env('STREAM', 'stream9') +build_args := "--jobs=4 --build-arg=base=quay.io/centos-bootc/centos-bootc:"+stream + # Build the container image from current sources build *ARGS: - podman build --jobs=4 -t localhost/ostree {{ARGS}} . + podman build {{build_args}} -t localhost/ostree {{ARGS}} . build-unittest *ARGS: - podman build --jobs=4 --target build -t localhost/ostree-buildroot {{ARGS}} . + podman build {{build_args}} --target build -t localhost/ostree-buildroot {{ARGS}} . # Do a build but don't regenerate the initramfs build-noinitramfs *ARGS: - podman build --jobs=4 --target rootfs -t localhost/ostree {{ARGS}} . + podman build {{build_args}} --target rootfs -t localhost/ostree {{ARGS}} . + +unitcontainer-build *ARGS: + podman build {{build_args}} --target bin-and-test -t localhost/ostree-bintest {{ARGS}} . # We need a filesystem that supports O_TMPFILE right now (i.e. not overlayfs) # or ostree hard crashes in the http code =/ @@ -33,8 +39,6 @@ unittest-shell: build-unittest # For some reason doing the bind mount isn't working on at least the GHA Ubuntu 24.04 runner # without --privileged. I think it may be apparmor? unitpriv := if osid == "ubuntu" { "--privileged" } else { "" } -unitcontainer-build: - podman build --jobs=4 --target bin-and-test -t localhost/ostree-bintest . unitcontainer: unitcontainer-build # need cap-add=all for mounting podman run --rm --net=none {{unitpriv}} {{unittest_args}} --cap-add=all --env=TEST_CONTAINER=1 localhost/ostree-bintest /tests/run.sh @@ -59,4 +63,4 @@ clang-format: # Check source files against clang-format defaults clang-format-check: - {{sourcefiles}} | xargs clang-format -i --Werror --dry-run \ No newline at end of file + {{sourcefiles}} | xargs clang-format -i --Werror --dry-run